package Comprehensive_01;

public class RecursionDemo2 {
    // 利用递归求5的阶乘
    public static void main(String[] args) {
        System.out.println(5 * 4 * 3 * 2 * 1);
        System.out.println(Factorial(5));
    }

    private static int Factorial(int number) {
        if (number == 1) {
            return 1;
        }
        return number * Factorial(number - 1);
    }
}
